package org.lcc.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.lcc.entity.ExamFaceRecord;
import org.lcc.entity.ExamFaceStatistics;
import org.lcc.entity.StudentFace;

import java.util.List;

@Mapper
public interface ExamFaceMapper {
    
    /**
     * 获取学生人脸图片
     */
    String getStudentFaceImage(String username);
    
    /**
     * 更新学生人脸图片
     */
    void updateStudentFaceImage(@Param("username") String username, @Param("imageCapture") String imageCapture);
    
    /**
     * 检查学生是否已采集人脸
     */
    int checkStudentFaceCollected(String username);
    
    /**
     * 获取考试初始人脸图片
     */
    String getInitialFaceImage(@Param("examId") Long examId, @Param("username") String username);
    
    /**
     * 插入人脸检测记录
     */
    void insertFaceRecord(ExamFaceRecord record);
    
    /**
     * 获取考试人脸检测记录
     */
    List<ExamFaceRecord> getExamFaceRecords(Long examId);
    
    /**
     * 插入或更新人脸检测统计
     */
    void insertOrUpdateFaceStatistics(ExamFaceStatistics statistics);

    /**
     * 插入学生人脸记录
     */
    void insertStudentFace(StudentFace studentFace);

    /**
     * 获取考试人脸统计
     */
    ExamFaceStatistics getFaceStatistics(@Param("examId") Long examId, @Param("username") String username);
} 